
import java.util.*; 


public class IterateMap {     
    public static void main(String[] args) {         
        Map map = new HashMap();         
        map.put("s", "first");         
        map.put("j", "second");         
        map.put("st", "third");         
         
        Collection<String> col = map.values();
        for (String s : col) {
            System.out.println(s);
        }



        Set<String> set1 = new TreeSet<String>();
        set1.add("s");
        set1.add("j");
        set1.add("st");
        set1.add("edit");
        System.out.println(set1);
    }
} 
